package com.ch.boundarycallbackdemo.bean

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey

data class NewsBean(
    val error_code: Int,
    val reason: String,
    val result: Result
)

data class Result(
    val data: List<Data>,
    val page: String,
    val pageSize: String,
    val stat: String
)

@Entity(tableName = "data")
data class Data(
    @PrimaryKey(autoGenerate = true)
    @ColumnInfo(name = "id", typeAffinity = ColumnInfo.INTEGER)
    val id: Int=1,
    @ColumnInfo(name = "author_name", typeAffinity = ColumnInfo.TEXT)
    val author_name: String,
    @ColumnInfo(name = "category", typeAffinity = ColumnInfo.TEXT)
    val category: String,
    @ColumnInfo(name = "date", typeAffinity = ColumnInfo.TEXT)
    val date: String,
    @ColumnInfo(name = "is_content", typeAffinity = ColumnInfo.TEXT)
    val is_content: String,
    @ColumnInfo(name = "thumbnail_pic_s", typeAffinity = ColumnInfo.TEXT)
    val thumbnail_pic_s: String,
    @ColumnInfo(name = "title", typeAffinity = ColumnInfo.TEXT)
    val title: String,
    @ColumnInfo(name = "uniquekey", typeAffinity = ColumnInfo.TEXT)
    val uniquekey: String,
    @ColumnInfo(name = "url", typeAffinity = ColumnInfo.TEXT)
    val url: String
) {
    override fun toString(): String {
        return "Data(author_name='$author_name', category='$category', date='$date', is_content='$is_content', thumbnail_pic_s='$thumbnail_pic_s', title='$title', uniquekey='$uniquekey', url='$url')"
    }
}